<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>免费设计</title>
<link rel="stylesheet" type="text/css" href="css/lib/swiper.min.css"/>
<link rel="stylesheet" type="text/css" href="css/lib/doumee.css"/>
<link rel="stylesheet" type="text/css" href="css/public.css"/>
<link rel="stylesheet" type="text/css" href="css/lib/dialog.css"/>
<link rel="stylesheet" type="text/css" href="css/design.css"/>
<script src="js/lib/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/doumee.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/vue-2.5.17.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/dialog.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>

<div id="wrapper">

	<footer class="footer top-line main-line dm-clearfix" id="designBottom">
		<a class="flex-row dm-left" @click="contact">
			<span class="icon"></span>我要咨询
		</a>
		<a class="btn flex-row dm-left" @click="skipMod">立即免费获取</a>
	</footer>
	
	<div class="swiper-container bg-w Main" id="Main">
		<div class="swiper-wrapper">
			<div class="swiper-slide content">
				
				<div class="children">
					
					<img src="image/designer/bg.jpg" />
					
					<div class="design-wrap" id="applyMod">
						<dl class="bt">
							<dt>免费获取设计报价方案</dt>
							<dd>志邦承诺您的信息将被严格保密，请放心填写</dd>
						</dl>
						<form action="" method="">
							
							<div class="box">
								<input type="text" name="userName" placeholder="您的姓名" />
								<input type="tel" name="phone" placeholder="手机号码" />
							</div>
							
							<button class="btn" type="button">立即免费获取</button>
						</form>
						<p class="h5 txt">已为 33333 户业主定制免费户型设计方案</p>
					</div>
					
					<img src="image/designer/intro_01.jpg" />
					<img src="image/designer/intro_02.jpg" />
					<img src="image/designer/intro_03.jpg" />
					
					<div class="swiper-container" data-rate='1' id="caseBanner">
						<div class="swiper-wrapper">
							<div class="swiper-slide cover" data-rate='1' v-for="item in banner">
								<img :src="item.path" />
							</div>
						</div>
						<div class="swiper-pagination"></div>
					</div>
					
					<img src="image/designer/intro_05.jpg" />
					<img src="image/designer/intro_06.jpg" />
					<img src="image/designer/intro_07.jpg" />
					
				</div>
				
			</div>
		</div>
	</div>
	
</div>

<script type="text/javascript">
	
	var vm = new Vue({
		el:"#wrapper",
		data:{
			swiper:'',
			banner:[
				{path:'image/test/swiper-1.jpg'},
				{path:'image/test/swiper-1.jpg'},
				{path:'image/test/swiper-1.jpg'},
				{path:'image/test/swiper-1.jpg'},
			],
		},
		methods:{
			//咨询
			contact:function(){
				dmAlert('客服电话<br />400-234-1324',{
					enter:'拨号',
					success:function(){
						location.href = 'tel:400-234-1324';
					}
				});
			},
			//跳转到填写信息位置
			skipMod:function(){
				var that = this;
				var st = $("#applyMod").prev().height();
				that.swiper.setTransition(300);//设定过渡的时间
		    	that.swiper.setTranslate(-st);//设定位移，可以为正数
			},
			//创建banner
			setCaseBanner:function(){
				var mySwiper = new Swiper('#caseBanner',{
					loop:false,
					watchOverflow:true,//slide为1个时,swiper会失效且隐藏导航等。
					autoplay:true,
					preloadImages:false,//默认为true，Swiper会强制加载所有图片。
					updateOnImagesReady : true,//当所有的内嵌图像（img标签）加载完成后Swiper会重新初始化
					
					pagination: {
				      el: '#caseBanner .swiper-pagination',
				    },
				});
			},
		},
		created:function(){
			imgRate();
		},
		mounted:function(){
			this.setCaseBanner();
			this.swiper = pullSwiper('#Main');
		},
	});
	
</script>

</body>
</html>
